OpenHMD
Loading...
Searching...
No Matches
openhmd.h
Go to the documentation of this file.
1/*
2 * OpenHMD - Free and Open Source API and drivers for immersive technology.
3 * Copyright (C) 2013 Fredrik Hultin.
4 * Copyright (C) 2013 Jakob Bornecrantz.
5 * Distributed under the Boost 1.0 licence, see LICENSE for full text.
6 */
7
8/**
9 * \file openhmd.h
10 * Main header for OpenHMD public API.
11 **/
12
13#ifndef OPENHMD_H
14#define OPENHMD_H
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20#ifdef _WIN32
21#ifdef DLL_EXPORT
22#define OHMD_APIENTRY __cdecl
23#define OHMD_APIENTRYDLL __declspec( dllexport )
24#else
25#ifdef OHMD_STATIC
26#define OHMD_APIENTRY __cdecl
27#define OHMD_APIENTRYDLL
28#else
29#define OHMD_APIENTRY __cdecl
30#define OHMD_APIENTRYDLL __declspec( dllimport )
31#endif
32#endif
33#else
34#define OHMD_APIENTRY
35#define OHMD_APIENTRYDLL __attribute__((visibility("default")))
36#endif
37
38/** Maximum length of a string, including termination, in OpenHMD. */
39#define OHMD_STR_SIZE 256
40
41/** Return status codes, used for all functions that can return an error. */
42typedef enum {
43 OHMD_S_OK = 0,
44 OHMD_S_UNKNOWN_ERROR = -1,
45 OHMD_S_INVALID_PARAMETER = -2,
46 OHMD_S_UNSUPPORTED = -3,
47 OHMD_S_INVALID_OPERATION = -4,
48
49 /** OHMD_S_USER_RESERVED and below can be used for user purposes, such as errors within ohmd wrappers, etc. */
52
53/** A collection of string value information types, used for getting information with ohmd_list_gets(). */
54typedef enum {
55 OHMD_VENDOR = 0,
56 OHMD_PRODUCT = 1,
57 OHMD_PATH = 2,
59
60/** A collection of string descriptions, used for getting strings with ohmd_gets(). */
61typedef enum {
62 OHMD_GLSL_DISTORTION_VERT_SRC = 0,
63 OHMD_GLSL_DISTORTION_FRAG_SRC = 1,
64 OHMD_GLSL_330_DISTORTION_VERT_SRC = 2,
65 OHMD_GLSL_330_DISTORTION_FRAG_SRC = 3,
66 OHMD_GLSL_ES_DISTORTION_VERT_SRC = 4,
67 OHMD_GLSL_ES_DISTORTION_FRAG_SRC = 5,
69
70/** Standard controls. Note that this is not an index into the control state.
71 Use OHMD_CONTROL_TYPES to determine what function a control serves at a given index. */
72typedef enum {
73 OHMD_GENERIC = 0,
74 OHMD_TRIGGER = 1,
75 OHMD_TRIGGER_CLICK = 2,
76 OHMD_SQUEEZE = 3,
77 OHMD_MENU = 4,
78 OHMD_HOME = 5,
79 OHMD_ANALOG_X = 6,
80 OHMD_ANALOG_Y = 7,
81 OHMD_ANALOG_PRESS = 8,
82 OHMD_BUTTON_A = 9,
83 OHMD_BUTTON_B = 10,
84 OHMD_BUTTON_X = 11,
85 OHMD_BUTTON_Y = 12,
86 OHMD_VOLUME_PLUS = 13,
87 OHMD_VOLUME_MINUS = 14,
88 OHMD_MIC_MUTE = 15,
90
91/** Control type. Indicates whether controls are digital or analog. */
92typedef enum {
93 OHMD_DIGITAL = 0,
94 OHMD_ANALOG = 1
96
97/** A collection of float value information types, used for getting and setting information with
98 ohmd_device_getf() and ohmd_device_setf(). */
99typedef enum {
100 /** float[4] (get): Absolute rotation of the device, in space, as a quaternion (x, y, z, w). */
102
103 /** float[16] (get): A "ready to use" OpenGL style 4x4 matrix with a modelview matrix for the
104 left eye of the HMD. */
106 /** float[16] (get): A "ready to use" OpenGL style 4x4 matrix with a modelview matrix for the
107 right eye of the HMD. */
109
110 /** float[16] (get): A "ready to use" OpenGL style 4x4 matrix with a projection matrix for the
111 left eye of the HMD. */
113 /** float[16] (get): A "ready to use" OpenGL style 4x4 matrix with a projection matrix for the
114 right eye of the HMD. */
116
117 /** float[3] (get): A 3-D vector representing the absolute position of the device, in space. */
119
120 /** float[1] (get): Physical width of the device screen in metres. */
122 /** float[1] (get): Physical height of the device screen in metres. */
124
125 /** float[1] (get): Physical separation of the device lenses in metres. */
127 /** float[1] (get): Physical vertical position of the lenses in metres. */
129
130 /** float[1] (get): Physical field of view for the left eye in degrees. */
132 /** float[1] (get): Physical display aspect ratio for the left eye screen. */
134 /** float[1] (get): Physical field of view for the left right in degrees. */
136 /** float[1] (get): Physical display aspect ratio for the right eye screen. */
138
139 /** float[1] (get, set): Physical interpupillary distance of the user in metres. */
141
142 /** float[1] (get, set): Z-far value for the projection matrix calculations (i.e. drawing distance). */
144 /** float[1] (get, set): Z-near value for the projection matrix calculations (i.e. close clipping distance). */
146
147 /** float[6] (get): Device specific distortion value. */
149
150 /**
151 * float[10] (set): Perform sensor fusion on values from external sensors.
152 *
153 * Values are: dt (time since last update in seconds) X, Y, Z gyro, X, Y, Z accelerometer and X, Y, Z magnetometer.
154 **/
156
157 /** float[4] (get): Universal shader distortion coefficients (PanoTools model <a,b,c,d>. */
159
160 /** float[3] (get): Universal shader aberration coefficients (post warp scaling <r,g,b>. */
162
163 /** float[OHMD_CONTROL_COUNT] (get): Get the state of the device's controls. */
165
167
168/** A collection of int value information types used for getting information with ohmd_device_geti(). */
169typedef enum {
170 /** int[1] (get, ohmd_geti()): Physical horizontal resolution of the device screen. */
172 /** int[1] (get, ohmd_geti()): Physical vertical resolution of the device screen. */
174
175 /** int[1] (get, ohmd_geti()/ohmd_list_geti()): Gets the class of the device. See: ohmd_device_class. */
177 /** int[1] (get, ohmd_geti()/ohmd_list_geti()): Gets the flags of the device. See: ohmd_device_flags. */
179
180 /** int[1] (get, ohmd_geti()): Get the number of analog and digital controls of the device. */
182
183 /** int[OHMD_CONTROL_COUNT] (get, ohmd_geti()): Get what function controls serve. */
185
186 /** int[OHMD_CONTROL_COUNT] (get, ohmd_geti()): Get whether controls are digital or analog. */
189
190/** A collection of data information types used for setting information with ohmd_set_data(). */
191typedef enum {
192 /** void* (set): Set void* data for use in the internal drivers. */
194 /**
195 * ohmd_device_properties* (set):
196 * Set the device properties based on the ohmd_device_properties struct for use in the internal drivers.
197 *
198 * This can be used to fill in information about the device internally, such as Android, or for setting profiles.
199 **/
202
203typedef enum {
204 /** int[1] (set, default: 1): Set this to 0 to prevent OpenHMD from creating background threads to do automatic device ticking.
205 Call ohmd_update(); must be called frequently, at least 10 times per second, if the background threads are disabled. */
208
209/** Device classes. */
210typedef enum
211{
212 /** HMD device. */
214 /** Controller device. */
216 /** Generic tracker device. */
219
220/** Device flags. */
221typedef enum
222{
223 /** Device is a null (dummy) device. */
225 OHMD_DEVICE_FLAGS_POSITIONAL_TRACKING = 2,
226 OHMD_DEVICE_FLAGS_ROTATIONAL_TRACKING = 4,
227 OHMD_DEVICE_FLAGS_LEFT_CONTROLLER = 8,
228 OHMD_DEVICE_FLAGS_RIGHT_CONTROLLER = 16,
230
231/** An opaque pointer to a context structure. */
233
234/** An opaque pointer to a structure representing a device, such as an HMD. */
236
237/** An opaque pointer to a structure representing arguments for a device. */
239
240/**
241 * Create an OpenHMD context.
242 *
243 * @return a pointer to an allocated ohmd_context on success or NULL if it fails.
244 **/
245OHMD_APIENTRYDLL ohmd_context* OHMD_APIENTRY ohmd_ctx_create(void);
246
247/**
248 * Destroy an OpenHMD context.
249 *
250 * ohmd_ctx_destroy de-initializes and de-allocates an OpenHMD context allocated with ohmd_ctx_create.
251 * All devices associated with the context are automatically closed.
252 *
253 * @param ctx The context to destroy.
254 **/
255OHMD_APIENTRYDLL void OHMD_APIENTRY ohmd_ctx_destroy(ohmd_context* ctx);
256
257/**
258 * Get the last error as a human readable string.
259 *
260 * If a function taking a context as an argument (ohmd_context "methods") returns non-successfully,
261 * a human readable error message describing what went wrong can be retrieved with this function.
262 *
263 * @param ctx The context to retrieve the error message from.
264 * @return a pointer to the error message.
265 **/
266OHMD_APIENTRYDLL const char* OHMD_APIENTRY ohmd_ctx_get_error(ohmd_context* ctx);
267
268/**
269 * Update a context.
270 *
271 * Update the values for the devices handled by a context.
272 *
273 * If background threads are disabled, this performs tasks like pumping events from the device. The exact details
274 * are up to the driver but try to call it quite frequently.
275 * Once per frame in a "game loop" should be sufficient.
276 * If OpenHMD is handled in a background thread in your program, calling ohmd_ctx_update and then sleeping for 10-20 ms
277 * is recommended.
278 *
279 * @param ctx The context that needs updating.
280 **/
281OHMD_APIENTRYDLL void OHMD_APIENTRY ohmd_ctx_update(ohmd_context* ctx);
282
283/**
284 * Probe for devices.
285 *
286 * Probes for and enumerates supported devices attached to the system.
287 *
288 * @param ctx A context with no currently open devices.
289 * @return the number of devices found on the system.
290 **/
291OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_ctx_probe(ohmd_context* ctx);
292
293/**
294 * Get string from openhmd.
295 *
296 * Gets a string from OpenHMD. This is where non-device specific strings reside.
297 * This is where the distortion shader sources can be retrieved.
298 *
299 * @param type The name of the string to fetch. One of OHMD_GLSL_DISTORTION_FRAG_SRC, and OHMD_GLSL_DISTORTION_FRAG_SRC.
300 * @param out The location to return a const char*
301 * @return 0 on success, <0 on failure.
302 **/
303OHMD_APIENTRYDLL int ohmd_gets(ohmd_string_description type, const char** out);
304
305/**
306 * Get device description from enumeration list index.
307 *
308 * Gets a human readable device description string from a zero indexed enumeration index
309 * between 0 and (max - 1), where max is the number ohmd_ctx_probe returned
310 * (i.e. if ohmd_ctx_probe returns 3, valid indices are 0, 1 and 2).
311 * The function can return three types of data. The vendor name, the product name and
312 * a driver specific path where the device is attached.
313 *
314 * ohmd_ctx_probe must be called before calling ohmd_list_gets.
315 *
316 * @param ctx A (probed) context.
317 * @param index An index, between 0 and the value returned from ohmd_ctx_probe.
318 * @param type The type of data to fetch. One of OHMD_VENDOR, OHMD_PRODUCT and OHMD_PATH.
319 * @return a string with a human readable device name.
320 **/
321OHMD_APIENTRYDLL const char* OHMD_APIENTRY ohmd_list_gets(ohmd_context* ctx, int index, ohmd_string_value type);
322
323
324/**
325 * Get integer value from enumeration list index.
326 *
327 *
328 *
329 * ohmd_ctx_probe must be called before calling ohmd_list_gets.
330 *
331 * @param ctx A (probed) context.
332 * @param index An index, between 0 and the value returned from ohmd_ctx_probe.
333 * @param type What type of value to retrieve, ohmd_int_value section for more information.
334 * @return 0 on success, <0 on failure.
335 **/
336OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_list_geti(ohmd_context* ctx, int index, ohmd_int_value type, int* out);
337
338/**
339 * Open a device.
340 *
341 * Opens a device from a zero indexed enumeration index between 0 and (max - 1)
342 * where max is the number ohmd_ctx_probe returned (i.e. if ohmd_ctx_probe returns 3,
343 * valid indices are 0, 1 and 2).
344 *
345 * ohmd_ctx_probe must be called before calling ohmd_list_open_device.
346 *
347 * @param ctx A (probed) context.
348 * @param index An index, between 0 and the value returned from ohmd_ctx_probe.
349 * @return a pointer to an ohmd_device, which represents a hardware device, such as an HMD.
350 **/
351OHMD_APIENTRYDLL ohmd_device* OHMD_APIENTRY ohmd_list_open_device(ohmd_context* ctx, int index);
352
353/**
354 * Open a device with additional settings provided.
355 *
356 * Opens a device from a zero indexed enumeration index between 0 and (max - 1)
357 * where max is the number ohmd_ctx_probe returned (i.e. if ohmd_ctx_probe returns 3,
358 * valid indices are 0, 1 and 2).
359 *
360 * ohmd_ctx_probe must be called before calling ohmd_list_open_device.
361 *
362 * @param ctx A (probed) context.
363 * @param index An index, between 0 and the value returned from ohmd_ctx_probe.
364 * @param settings A pointer to a device settings struct.
365 * @return a pointer to an ohmd_device, which represents a hardware device, such as an HMD.
366 **/
367OHMD_APIENTRYDLL ohmd_device* OHMD_APIENTRY ohmd_list_open_device_s(ohmd_context* ctx, int index, ohmd_device_settings* settings);
368
369/**
370 * Specify int settings in a device settings struct.
371 *
372 * @param settings The device settings struct to set values to.
373 * @param key The specefic setting you wish to set.
374 * @param value A pointer to an int or int array (containing the expected number of elements) with the value(s) you wish to set.
375 **/
376OHMD_APIENTRYDLL ohmd_status OHMD_APIENTRY ohmd_device_settings_seti(ohmd_device_settings* settings, ohmd_int_settings key, const int* val);
377
378/**
379 * Create a device settings instance.
380 *
381 * @param ctx A pointer to a valid ohmd_context.
382 * @return a pointer to an allocated ohmd_context on success or NULL if it fails.
383 **/
385
386/**
387 * Destroy a device settings instance.
388 *
389 * @param ctx The device settings instance to destroy.
390 **/
391OHMD_APIENTRYDLL void OHMD_APIENTRY ohmd_device_settings_destroy(ohmd_device_settings* settings);
392
393/**
394 * Close a device.
395 *
396 * Closes a device opened by ohmd_list_open_device. Note that ohmd_ctx_destroy automatically closes any open devices
397 * associated with the context being destroyed.
398 *
399 * @param device The open device.
400 * @return 0 on success, <0 on failure.
401 **/
402OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_close_device(ohmd_device* device);
403
404/**
405 * Get a floating point value from a device.
406 *
407 *
408 * @param device An open device to retrieve the value from.
409 * @param type What type of value to retrieve, see ohmd_float_value section for more information.
410 * @param[out] out A pointer to a float, or float array where the retrieved value should be written.
411 * @return 0 on success, <0 on failure.
412 **/
413OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_device_getf(ohmd_device* device, ohmd_float_value type, float* out);
414
415/**
416 * Set a floating point value for a device.
417 *
418 * @param device An open device to set the value in.
419 * @param type What type of value to set, see ohmd_float_value section for more information.
420 * @param in A pointer to a float, or float array where the new value is stored.
421 * @return 0 on success, <0 on failure.
422 **/
423OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_device_setf(ohmd_device* device, ohmd_float_value type, const float* in);
424
425/**
426 * Get an integer value from a device.
427 *
428 * @param device An open device to retrieve the value from.
429 * @param type What type of value to retrieve, ohmd_int_value section for more information.
430 * @param[out] out A pointer to an integer, or integer array where the retrieved value should be written.
431 * @return 0 on success, <0 on failure.
432 **/
433OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_device_geti(ohmd_device* device, ohmd_int_value type, int* out);
434
435/**
436 * Set an integer value for a device.
437 *
438 * @param device An open device to set the value in.
439 * @param type What type of value to set, see ohmd_float_value section for more information.
440 * @param in A pointer to a int, or int array where the new value is stored.
441 * @return 0 on success, <0 on failure.
442 **/
443OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_device_seti(ohmd_device* device, ohmd_int_value type, const int* in);
444
445/**
446 * Set an void* data value for a device.
447 *
448 * @param device An open device to set the value in.
449 * @param type What type of value to set, see ohmd_float_value section for more information.
450 * @param in A pointer to the void* casted object.
451 * @return 0 on success, <0 on failure.
452 **/
453OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_device_set_data(ohmd_device* device, ohmd_data_value type, const void* in);
454
455/**
456 * Get the library version.
457 *
458 * @param major Major version.
459 * @param minor Minor version.
460 * @param patch Patch version.
461 **/
462OHMD_APIENTRYDLL void OHMD_APIENTRY ohmd_get_version(int* out_major, int* out_minor, int* out_patch);
463
464/**
465 * Check that the library is compatible with the required version.
466 *
467 * @param major Required major version.
468 * @param minor Required minor version.
469 * @param patch Required patch version.
470 * @return OMHD_S_OK if the version is compatible or OHMD_S_UNSUPPORTED if it's not.
471 **/
472OHMD_APIENTRYDLL ohmd_status OHMD_APIENTRY ohmd_require_version(int major, int minor, int patch);
473
474/**
475 * Sleep for the given amount of seconds.
476 *
477 * @param time Time to sleep in seconds.
478 **/
479OHMD_APIENTRYDLL void OHMD_APIENTRY ohmd_sleep(double time);
480
481#ifdef __cplusplus
482}
483#endif
484
485#endif
ohmd_float_value
Definition: openhmd.h:99
@ OHMD_UNIVERSAL_ABERRATION_K
Definition: openhmd.h:161
@ OHMD_POSITION_VECTOR
Definition: openhmd.h:118
@ OHMD_RIGHT_EYE_ASPECT_RATIO
Definition: openhmd.h:137
@ OHMD_LEFT_EYE_GL_PROJECTION_MATRIX
Definition: openhmd.h:112
@ OHMD_RIGHT_EYE_FOV
Definition: openhmd.h:135
@ OHMD_PROJECTION_ZFAR
Definition: openhmd.h:143
@ OHMD_EYE_IPD
Definition: openhmd.h:140
@ OHMD_LENS_HORIZONTAL_SEPARATION
Definition: openhmd.h:126
@ OHMD_LEFT_EYE_FOV
Definition: openhmd.h:131
@ OHMD_RIGHT_EYE_GL_MODELVIEW_MATRIX
Definition: openhmd.h:108
@ OHMD_RIGHT_EYE_GL_PROJECTION_MATRIX
Definition: openhmd.h:115
@ OHMD_SCREEN_VERTICAL_SIZE
Definition: openhmd.h:123
@ OHMD_CONTROLS_STATE
Definition: openhmd.h:164
@ OHMD_UNIVERSAL_DISTORTION_K
Definition: openhmd.h:158
@ OHMD_ROTATION_QUAT
Definition: openhmd.h:101
@ OHMD_EXTERNAL_SENSOR_FUSION
Definition: openhmd.h:155
@ OHMD_LEFT_EYE_ASPECT_RATIO
Definition: openhmd.h:133
@ OHMD_LENS_VERTICAL_POSITION
Definition: openhmd.h:128
@ OHMD_DISTORTION_K
Definition: openhmd.h:148
@ OHMD_SCREEN_HORIZONTAL_SIZE
Definition: openhmd.h:121
@ OHMD_PROJECTION_ZNEAR
Definition: openhmd.h:145
@ OHMD_LEFT_EYE_GL_MODELVIEW_MATRIX
Definition: openhmd.h:105
OHMD_APIENTRYDLL ohmd_device *OHMD_APIENTRY ohmd_list_open_device_s(ohmd_context *ctx, int index, ohmd_device_settings *settings)
OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_device_geti(ohmd_device *device, ohmd_int_value type, int *out)
ohmd_device_class
Definition: openhmd.h:211
@ OHMD_DEVICE_CLASS_CONTROLLER
Definition: openhmd.h:215
@ OHMD_DEVICE_CLASS_GENERIC_TRACKER
Definition: openhmd.h:217
@ OHMD_DEVICE_CLASS_HMD
Definition: openhmd.h:213
ohmd_string_value
Definition: openhmd.h:54
OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_device_setf(ohmd_device *device, ohmd_float_value type, const float *in)
OHMD_APIENTRYDLL void OHMD_APIENTRY ohmd_ctx_update(ohmd_context *ctx)
struct ohmd_context ohmd_context
Definition: openhmd.h:232
OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_device_set_data(ohmd_device *device, ohmd_data_value type, const void *in)
OHMD_APIENTRYDLL ohmd_device *OHMD_APIENTRY ohmd_list_open_device(ohmd_context *ctx, int index)
ohmd_int_settings
Definition: openhmd.h:203
@ OHMD_IDS_AUTOMATIC_UPDATE
Definition: openhmd.h:206
OHMD_APIENTRYDLL ohmd_context *OHMD_APIENTRY ohmd_ctx_create(void)
OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_ctx_probe(ohmd_context *ctx)
ohmd_int_value
Definition: openhmd.h:169
@ OHMD_DEVICE_CLASS
Definition: openhmd.h:176
@ OHMD_DEVICE_FLAGS
Definition: openhmd.h:178
@ OHMD_SCREEN_VERTICAL_RESOLUTION
Definition: openhmd.h:173
@ OHMD_CONTROLS_TYPES
Definition: openhmd.h:187
@ OHMD_CONTROL_COUNT
Definition: openhmd.h:181
@ OHMD_CONTROLS_HINTS
Definition: openhmd.h:184
@ OHMD_SCREEN_HORIZONTAL_RESOLUTION
Definition: openhmd.h:171
ohmd_control_type
Definition: openhmd.h:92
OHMD_APIENTRYDLL ohmd_device_settings *OHMD_APIENTRY ohmd_device_settings_create(ohmd_context *ctx)
OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_device_seti(ohmd_device *device, ohmd_int_value type, const int *in)
OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_device_getf(ohmd_device *device, ohmd_float_value type, float *out)
ohmd_status
Definition: openhmd.h:42
@ OHMD_S_USER_RESERVED
Definition: openhmd.h:50
OHMD_APIENTRYDLL void OHMD_APIENTRY ohmd_device_settings_destroy(ohmd_device_settings *settings)
OHMD_APIENTRYDLL int ohmd_gets(ohmd_string_description type, const char **out)
struct ohmd_device ohmd_device
Definition: openhmd.h:235
ohmd_device_flags
Definition: openhmd.h:222
@ OHMD_DEVICE_FLAGS_NULL_DEVICE
Definition: openhmd.h:224
OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_close_device(ohmd_device *device)
ohmd_control_hint
Definition: openhmd.h:72
OHMD_APIENTRYDLL ohmd_status OHMD_APIENTRY ohmd_require_version(int major, int minor, int patch)
OHMD_APIENTRYDLL void OHMD_APIENTRY ohmd_sleep(double time)
OHMD_APIENTRYDLL void OHMD_APIENTRY ohmd_ctx_destroy(ohmd_context *ctx)
OHMD_APIENTRYDLL const char *OHMD_APIENTRY ohmd_ctx_get_error(ohmd_context *ctx)
OHMD_APIENTRYDLL ohmd_status OHMD_APIENTRY ohmd_device_settings_seti(ohmd_device_settings *settings, ohmd_int_settings key, const int *val)
struct ohmd_device_settings ohmd_device_settings
Definition: openhmd.h:238
OHMD_APIENTRYDLL int OHMD_APIENTRY ohmd_list_geti(ohmd_context *ctx, int index, ohmd_int_value type, int *out)
OHMD_APIENTRYDLL const char *OHMD_APIENTRY ohmd_list_gets(ohmd_context *ctx, int index, ohmd_string_value type)
ohmd_data_value
Definition: openhmd.h:191
@ OHMD_DRIVER_DATA
Definition: openhmd.h:193
@ OHMD_DRIVER_PROPERTIES
Definition: openhmd.h:200
OHMD_APIENTRYDLL void OHMD_APIENTRY ohmd_get_version(int *out_major, int *out_minor, int *out_patch)
ohmd_string_description
Definition: openhmd.h:61